<?php
require_once '../sub/init.php';
$currfields = MATE_DIY_F;
require_once ZEAI.'m/my_chk_u.php';
$mateROW=$row;
require_once ZEAI.'cache/udata.php';
require_once ZEAI.'cache/config_vip.php';
$switch = json_decode($_ZEAI['switch'],true);
$nodatatips = '<div class="nodatatips"><i class="ico">&#xe659;</i>暂时没有符合你要求的会员<br><br>不要为幸福设置太高的门槛<br>也不要以貌取人，以财取人<br>请适当放宽【择偶条件】<br>请点击下方【设置】</div>';
if($submitok == 'ajax_getdata'){exit(getulistdata());}
function getulistdata() {
	global $db,$cook_sex,$_ZEAI,$nodatatips,$mateROW;
	$SQL  = mate_diy_SQL($mateROW);
	$SQL .= ($cook_sex == 2)?" AND sex=1 ":" AND sex=2 ";
	$rt=$db->query("SELECT id,sex,grade,photo_s,photo_f,RZ,birthday,edu,pay,job,heigh,photo_ifshow FROM ".__TBL_USER__." WHERE flag=1 AND myinfobfb>20 ".$SQL." ORDER BY rand() LIMIT 10");
	$total = $db->num_rows($rt);
	if ($total > 0) {
		for($i=1;$i<=$total;$i++) {
			$rows = $db->fetch_array($rt,'name');
			if(!$rows) break;
			$O .= rows_ulist($rows,$i);
		}
		return $O;
	} else {
		return $nodatatips;
	}
}
function rows_ulist($rows,$n=1) {
	global $_ZEAI,$_INDEX,$cook_uid,$cook_sex,$cook_grade,$zeai_cn;
	$switch = json_decode($_ZEAI['switch'],true);
	$blurclass = '';$lockstr = '';$ifblur=0;
	if(ifmLockBlur()){
		$lockstr = '<i class="ico lockico">&#xe620;</i><div class="lockstr">'.dataIO($switch['grade1LockBlurT'],'out').'</div>';
		$ifblur=1;
		$photo_b = 'blur';
	}else{
		$photo_b = ($_INDEX['waterfall_photo']=='b')?'b':'m';
	}
	$uid           = $rows['id'];
	$sex           = $rows['sex'];
	$grade         = $rows['grade'];
	$photo_s       = $rows['photo_s'];
	$photo_f       = $rows['photo_f'];
	$heigh         = $rows['heigh'];
	$job           = $rows['job'];
	$age = getage($rows['birthday']);
	$RZ  = $rows['RZ'];$RZarr = explode(',',$RZ);
	$pay = $rows['pay'];
	$edu = $rows['edu'];
	$photo_ifshow = $rows['photo_ifshow'];
	$age_str   = ($age>18)?$age.'岁':'';
	$edu_str   = (ifint($edu))?udata('edu',$edu):'';
	$heigh_str = (ifint($heigh))?' · '.udata('heigh',$heigh).' · ':'';
	$pay_str   = (ifint($pay))?'<b>'.udata('pay',$pay).'</b>':'';
	$job_str   = (ifint($job))?'<b>'.udata('job',$job).'</b>':'';
	$photo_b_url=photo_s_out('{"smb":"m","sex":"'.$sex.'","photo_s":"'.$photo_s.'","photo_f":"'.$photo_f.'","photo_ifshow":"'.$photo_ifshow.'","uflag":"'.$uflag.'","outkind":"url"}');
	$echo .= '<a href="'.mHref('u',$uid).'"><img class="m" src="'.$photo_b_url.'" />';
	$echo .= '<div class="uinfo">';
	//$echo .= '<div class="nik"><span>'.uicon($sex.$grade).$uid.'</span></div>';
	$echo.= '<div class="data"><span>'.uicon($sex.$grade).'<font>'.$age_str.$heigh_str.$edu_str.'</font></span><span>'.$job_str.$pay_str.'</span></div>';
	$echo .= '</div>';
	if(in_array('photo',$RZarr)){
		$echo.= '<img src="'.RES.'m/img/rzj2.png?'.$_ZEAI['cache_str'].'" class="rzj">';
	}elseif(in_array('identity',$RZarr)){
		$echo.= '<img src="'.RES.'m/img/rzj.png?'.$_ZEAI['cache_str'].'" class="rzj">';
	}
	if (!empty($RZ))$echo.= '<div class="payrz">'.RZ_html($RZ,'s','color').'</div>';
	$echo.= '</a>';
	if($n % 2 == 0)$echo.= '<div class="clear"></div>';
	return $echo;
}
?>
<!doctype html><html><head><meta charset="utf-8">
<title>我的-<?php echo $_ZEAI['siteName'];?></title>
<?php echo HEADMETA; ?>
<link href="<?php echo RES;?>m/css/m.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<link href="<?php echo HOST;?>/cache/zeaicolor.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<link href="<?php echo RES;?>/m/css/my_mateshow.css?<?php echo $_ZEAI['cache_str'];?>" rel="stylesheet" type="text/css" />
<script src="<?php echo RES;?>www_zeai_cn.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<script src="<?php echo RES;?>m/js/m.js?<?php echo $_ZEAI['cache_str'];?>"></script>
<style>
.tabmenu a.ed:after{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
header.bgcolor,.my_mateshow_btm a{background-color:<?php echo $_ZEAI['mob_mbcolor'];?>}
.my_mateshow_btm a{box-shadow:0 .3rem .8rem rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.4)}
.my_mateshow_btm .mateset{background-color:#fff;color:<?php echo $_ZEAI['mob_mbcolor'];?>;color:#333}
#ZEAI_list a .uinfo .data span b{background-color:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.05);color:<?php echo $_ZEAI['mob_mbcolor'];?>;border:rgba(<?php echo c16_rgb($_ZEAI['mob_mbcolor']);?>,.1) 1px solid}
<?php
if ($_ZEAI['m_mb']==2){
	echo '.TRnav_btn i{color:'.$_ZEAI['mob_mbcolor'].'}';
	$mini_class='top_mini4';
}else{
	$mini_class='top_mini4 zeaibg bgcolor yunbox';
}
$mini_title='智能配对';
?>
</style>
</head>
<body>
<?php
require_once ZEAI.'m/top_mini.php';?>
<div id="ZEAI_list"><?php echo getulistdata();?></div>
<div class="my_mateshow_btm">
    <a class="mateset" href="my_info.php?t=3&jumpurl=<?php echo urlencode(HOST.'/m/my_mateshow.php');?>"><i class="ico">&#xe6e8;</i> 设置</a>
    <a id="mateshow"><i class="ico">&#xe67d;</i> 换一组</a>
</div>
<script>mateshow.onclick=function(){zeai.loading();zeai.ajax({url:MHOST+'/my_mateshow'+zeai.ajxext+'submitok=ajax_getdata'},function(e){ZEAI_list.html(e);zeai.loading(0);});}</script>
<?php require_once ZEAI.'m/TRnav.php';?>
</body></html>